<h1>Editing user <%= link_to "Log out", admin_logout_path %></h1>

<%= form_for(@user) do |f| %>
  <% if @user.errors.any? %>
    <div class="fberrorbox" id="error_explanation">
      <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>

      <ul>
      <% @user.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="fbbluebox">
    <div class="fbgreybox"><h2>Edit user Details</h2></div>
    <table>
      <tr>
        <td>
    <div class="field">
    <%= f.label :name %><br />
    <%= f.text_field :name, :size => 50 %>
  </div>
        </td>
      </tr>
      <tr>
        <td>
  <div class="field">
    <%= f.label :user_password, 'Password' %><br />
    <%= f.text_field :password, :size => 50 %>
  </div>
        </td>
      </tr>
      <tr>
        <td>
  <div class="field">
    <%= f.label :user_password_confirmation, 'Confirm' %><br />
    <%= f.text_field :password_confirmation, :size => 50 %>
  </div>
        </td>
      </tr>
      </table>
    <table>
      <tr>
        <td style="width:80px"><%= f.label :privilege, 'Privilege' %></td>
        <td style="width:80px"><%= f.label :privilege %></td>
      </tr>

     </table>
    </div>
<br />

<div class="fbgreyboxbuttom">
  <div class="actions">
    <%= f.submit %>
  </div>
</div><br />
<% end %>

<div class="fbgreyboxbuttom">
<%= link_to 'Show', @user %> |
<%= link_to 'Back', users_path %>
</div>